package org.example.commonapi.domain.onlineCode;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@NoArgsConstructor
@Document(collection = "commit_statistics")
public class CommitStatistics {
    private String id;
    /**
     * 问题id
     */
    private String problemId;
    /**
     * 用户名
     */
    private String username;
    /**
     * 提交类型（0：time 1：runTime 2：memory）
     */
    private Integer type;
    /**
     * 提交值
     */
    private String key;
    /**
     * 占用数量
     */
    private Integer value;

    public CommitStatistics(String problemId, String username, Integer type, String key, Integer value) {
        this.problemId = problemId;
        this.username = username;
        this.type = type;
        this.key = key;
        this.value = value;

    }

    public CommitStatistics(String id,String problemId, String username, Integer type, String key, Integer value) {
        this.id = id;
        this.problemId = problemId;
        this.username = username;
        this.type = type;
        this.key = key;
        this.value = value;
    }
}
